//
//  bussineDataService.h
//  EsayBuy
//
//  Created by 颜 梁坚 on 13-8-20.
//  Copyright (c) 2013年 asiainfo-linkage. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HttpConnector.h"
#import <UIKit/UIKit.h>
#import "HttpStatus.h"


#define kForceUpdateTag         100
#define kLinkErrorTag           101
#define kTimeOutErrorTag        102
#define kSessionTimeOutTag      103

@protocol HttpBackDelegate<NSObject>

@required
//key: bussineCode value :; Key:errorCode, value: key:MSG, value:
- (void)requestDidFinished:(NSDictionary*)info;
//key: bussineCode value :; Key:errorCode, value: key:MSG, value:
- (void)requestFailed:(NSDictionary*)info;

@optional
//点击超时或者连接错误提示上的取消按钮的回调接口
- (void)cancelTimeOutAndLinkError;
@end

@interface bussineDataService : NSObject<UIAlertViewDelegate, HttpStatus>
{
    NSString*			receiveString;
	NSDictionary*		sendDataDic;
	NSString*			sendString;
	
	id<HttpBackDelegate>  target;
    SEL sendMessageSelector;
    HttpConnector* httpCnctor;
    // 一般都是第一级的节点的键值对，例如：RspCode=0000 ,key:"RspCode" value:"0000"
    NSDictionary*       rspInfo;
    NSString*			serversUrl;
}

@property (nonatomic,assign) id<HttpBackDelegate> target;
@property (nonatomic,retain) HttpConnector* httpCnctor;
@property (nonatomic,assign) SEL sendMessageSelector;
@property (nonatomic,retain) NSString*		receiveString;
@property (nonatomic,retain) NSString*		serversUrl;
@property (nonatomic,retain) NSDictionary*	sendDataDic;
@property (nonatomic,retain) NSString*		sendString;
@property (nonatomic,retain) NSDictionary*  rspInfo;
@property (nonatomic,retain) NSString *updateUrl;
@property (assign) BOOL HasLogIn;//判断是不是已经登录
@property (assign) BOOL LogInHttp;//判断是否登录接口调用
@property (nonatomic,retain) NSDictionary* TuiSongDic;
@property (nonatomic,retain) NSDictionary* loginInfo;
@property (nonatomic,assign) BOOL isShowHUD;
@property (nonatomic,assign) NSString *HUDStatusString;


+(bussineDataService *) sharedDataService;
+(bussineDataService *) sharedDataServicee;


- (void)qiankaLogin:(NSDictionary *)paramters;
#pragma mark - 实名返档
- (void)sureGuiDang:(NSDictionary *)paramters;

#pragma mark - 退出登录
- (void)usrtLogout:(NSDictionary *)paramters;
@end
